package com.example.goodpet.service;

import com.example.goodpet.bean.CommunityTiezi;
import com.example.goodpet.bean.ResponseBody;
import com.example.goodpet.bean.UserTieziInfo;
import com.example.goodpet.bean.UserTieziInfoAndHistory;
import com.example.goodpet.db.entity.GoodpetHistory;
import com.example.goodpet.db.entity.TieziHistory;
import com.example.goodpet.utils.AppNetConfig;

import java.util.List;

import retrofit2.Call;
import retrofit2.http.Body;
import retrofit2.http.POST;
import retrofit2.http.Query;

public interface CommunityService {

    //上传帖子信息
    @POST(AppNetConfig.UPLOAD_TIEZI_INFO)
    Call<ResponseBody<String>> uploadTieziInfo(@Body CommunityTiezi communityTiezi);
    //获取用户的帖子信息
    @POST(AppNetConfig.GET_USER_TIEZI)
    Call<ResponseBody<List<UserTieziInfo>>> getUserTiezi(@Query("userId") long userId,@Query("loginId") long loginId,@Query("page") int page);
    //获取用户收藏的帖子信息
    @POST(AppNetConfig.GET_USER_TIEZI_COLLECT)
    Call<ResponseBody<List<UserTieziInfo>>> getUserCollectTiezi(@Query("userId") long userId,@Query("page") int page);
    //获取用户点赞的帖子信息
    @POST(AppNetConfig.GET_USER_Likes)
    Call<ResponseBody<List<UserTieziInfo>>> getUserLikes(@Query("userId") long userId,@Query("page") int page);
    //删除用户帖子
    @POST(AppNetConfig.DELETE_TIEZI_BY_TIEZIID)
    Call<ResponseBody<String>> deleteByTieziId(@Query("tieziId") long tieziId);
    //获取帖子的浏览历史
    @POST(AppNetConfig.GET_MY_TIEZI_HISTORY)
    Call<ResponseBody<List<UserTieziInfoAndHistory>>> getMyTieziHistory(@Body List<TieziHistory> tieziHistories,@Query("loginId") long loginId);
}
